*/
private function getRevisionById( $id ) {
$rev = $this->revisionStore->getRevisionById( $id );
- if ( !$rev && $this->getUser()->isAllowedAny( 'deletedtext', 'undelete' ) ) {
+ if ( !$rev && $this->getPermissionManager()
+ ->userHasAnyRight( $this->getUser(), 'deletedtext', 'undelete' )
+ ) {
// Try the 'archive' table
$arQuery = $this->revisionStore->getArchiveQueryInfo();
$row = $this->getDB()->selectRow(
*/
private function setVals( &$vals, $prefix, $rev ) {
if ( $rev ) {
- $title = $rev->getPageAsLinkTarget();
+ $title = Title::newFromLinkTarget( $rev->getPageAsLinkTarget() );
if ( isset( $this->props['ids'] ) ) {
$vals["{$prefix}id"] = $title->getArticleID();
$vals["{$prefix}revid"] = $rev->getId();
$vals["{$prefix}comment"] = $comment->text;
}
$vals["{$prefix}parsedcomment"] = Linker::formatComment(
- $comment->text, Title::newFromLinkTarget( $title )
+ $comment->text, $title
);
}
}